#{extends 'main.html' /}
#{set title:'Home' /}

<h2>Upload file</h2>
<div class="objectForm">
    #{form @Application.uploadFile(), enctype:'multipart/form-data'}

    <div class="crudField crud_text">
        <label for="accountClabe">
            account:
        </label>
        <select id="accountClabe" name="accountClabe">

            %{activeAccounts.each() { }%

            <option value="${it.clabe}">${it}</option>
            %{ } }%
        </select>
    </div>

    <div class="crudField crud_text">

        <label for="statementLabel"> statment label :</label>
        <input type="text" name="statementLabel" value="${statementLabel}">
    </div>

    <div class="crudField crud_text">
        <label for="data"> excelFile :</label> <input type="file" name="data"/> <br/>
    </div>
    <p class="crudButtons">
        <input type="submit" name="submit" value="Aggiungi"/>
    </p>

    #{/form}
</div>

#{if transactionsCsv}
<h3>Readed file</h3>
<pre>
${transactionsCsv}
</pre>
#{/if}